package cn.lzx.exception;

import lombok.Getter;

@Getter
public enum GlobalErrorCode {
    OK("0", "成功"),

    ERROR("-1", "失败"),
    // 100xx公共异常
    SERVICE_PARAM_IS_NULL("10001", "参数不能为空！"),
    PARAM_IS_NULL_ERROR("10002","参数不能为空！"),
    GRAPHICCODE_ERROR("10003","图形验证码错误"),

    OPERATING_FREQUENTLY_ERROR("10003","请勿重复操作"),
    // system服务：200xx

    // uaa服务：200xx

    // usere服务：300xx开头
    USER_USERNAME_ERROR("50001", "用户名称不合法！"),
    CODE_IS_NULL_ERROR("50002","手机短信验证码为空"),
    CODE_ERROR("50003","手机验证码错误"),
    GRAPH_CODE_ERROR("50004","图形验证码错误"),
    USER_EXIST_ERROR("50005", "用户已经注册"),
    SAVE_ERROR("50006", "信息保存失败"),
    QUERY_FAILED("50007","查询失败")

    ;
    private String code;

    private String message;


    GlobalErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }
}
